package com.yaowk.system.api;

import com.yaowk.common.api.model.result.NavMenu;
import com.yaowk.system.api.model.Role;
import com.yaowk.system.api.model.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Set;

@FeignClient("system")
@RequestMapping("/system/auth")
public interface AuthApi {

    @GetMapping("/user")
    User user();

    @GetMapping("/role")
    List<Role> role();

    @GetMapping("/navigation")
    Set<NavMenu> navigation();

    @GetMapping("/{userId}/permission")
    List<Long> permission(@PathVariable Long userId);
}
